package mystatic.a01demo1;

public class Student {
    //属性:姓名、年龄、性别
    private String name;
    private String age;
    private String gender;
    public static String teacher;

    public Student() {
    }

    public Student(String name, String age, String gender) {
        this.name = name;
        this.age = age;
        this.gender = gender;
    }

    public Student(String name, String age, String gender, String teacher) {
        this.name = name;
        this.age = age;
        this.gender = gender;
        this.teacher = teacher;
    }

    /**
     * 获取
     * @return teacher
     */
    public static String getTeacher() {
        return teacher;
    }

    /**
     * 设置
     * @param teacher
     */
    public static void setTeacher(String teacher) {
        Student.teacher = teacher;
    }

    /**
     * 获取
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取
     * @return age
     */
    public String getAge() {
        return age;
    }

    /**
     * 设置
     * @param age
     */
    public void setAge(String age) {
        this.age = age;
    }

    /**
     * 获取
     * @return gender
     */
    public String getGender() {
        return gender;
    }

    /**
     * 设置
     * @param gender
     */
    public void setGender(String gender) {
        this.gender = gender;
    }


    //行为
    public void study(){
        System.out.println(name+"正在学习");
    }

    public String toString() {
        return "Student{name = " + name + ", age = " + age + ", gender = " + gender + ", teacher = " + teacher + "}";
    }
}
